﻿@{
    ViewBag.Title = Messages.HeadingLogViewerList;
}
@using PagedList.Mvc; 
@using PagedList; 

<div class="page-header">
    <h1>@ViewBag.Title</h1>
</div>
<table class="table table-striped table-condensed">
    <thead>
        <tr>
            <th>@Messages.LogListTitleDate</th>
            <th>@Messages.LogListTitleOperation</th>
            <th>@Messages.LogListTitleController</th>
            <th>@Messages.LogListTitleAction</th>
            <th>@Messages.LogListTitleDescription</th>
        </tr>
    </thead>
    @foreach( var logEntry in  ViewBag.CurrentLogItems)
    {
        <tr>
            <td>@logEntry.date</td>
            <td>@logEntry.LogOperationDescription</td>
            <td>@logEntry.module</td>
            <td>@logEntry.action</td>
            <td>@logEntry.description</td>
        </tr>
    }  
    
</table>
<div class="pagination-centered">
    @Html.PagedListPager( (IPagedList)ViewBag.CurrentLogItems, page => Url.Action("List", "LogViewer",new { id=page }) ,(PagedListRenderOptions)ViewBag.PagerRenderOptions)        
</div>
<br/>
<br/>